import Vue from 'vue'
import Router from 'vue-router'
import mainContent from '@/views/mainContent'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'mainContent',
      redirect: 'ruanjian', //  重定向
      component: mainContent,
      children: [
        // 软件管理
        {
          path: '/ruanjian',
          name: 'ruanjian',
          title: '软件管理',
          meta: {
            oneName: 'ruanjian'
          },
          component: () => import('@/views/ruanjian/index')
        },
        // 平台自身监控
        {
          path: '/jiankong',
          name: 'jiankong',
          title: '平台自身监控',
          meta: {
            oneName: 'jiankong'
          },
          component: () => import('@/views/jiankong/index')
        },
        // 自服务管理
        {
          path: '/services',
          name: 'services',
          title: '自服务管理',
          meta: {
            oneName: 'services'
          },
          component: () => import('@/views/services/index')
        },
        // 机房机柜监控图
        {
          path: '/cabinet',
          name: 'cabinet',
          title: '自服务管理',
          meta: {
            oneName: 'cabinet'
          },
          component: () => import('@/views/cabinet/index')
        },
        // 策略管理
        {
          path: '/celue',
          name: 'celue',
          title: '策略管理',
          meta: {
            oneName: 'celue'
          },
          component: () => import('@/views/celue/index')
        },
      ]
    }
  ]
})
